﻿
@{
    ViewData["Title"] = "河长资讯";
    Layout = "~/Views/Shared/_List.cshtml";
}

<div class="kit-table">
    <div id="toolbar" class="kit-table-header">
        <div class="layui-btn-group lonewolf-btns">

        </div>
        <style>
            .kit-search-keyword .layui-form-select dl {
                top: 31px;
            }
            .kit-search-keyword .layui-form-select dl dd {
                line-height: 30px;
            }
        </style>
        <div class="kit-search-inputs " style="width:650px;">
            <div class="layui-inline kit-search-keyword" style="float:left;">
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="test6" placeholder="请选择时间范围">
                </div>
            </div>
            <form class="layui-form" action="" style="float:left;margin-left:10px;">
                <div class="layui-inline kit-search-keyword">
                    <div class="layui-input-inline">
                        <select name="modules" lay-verify="required" lay-search="">
                            <option value="">选择资讯类型</option>
                            <option value="1">通知公告</option>
                            <option value="2">紧急通知</option>
                            <option value="3">政策法规</option>
                            <option value="4">治水动态</option>
                        </select>
                    </div>
                </div>
            </form>
            <div class="kit-search-keyword" style="float:right;">
                <input type="text" class="layui-input" name="keyword" id="keyword" placeholder="搜索关键字.." />
                <button href="javascript:;" onclick="initGrid()"><i class="layui-icon">&#xe615;</i></button>
            </div>
        </div>
    </div>
    <div class="kit-table-body">
        <table class="layui-table" lay-data="{height:'full-49', url:'/TestData/GetArc.json',method:'get', page:true, id:'TableList'}" lay-filter="demo">
            <thead>
                <tr>
                    <th lay-data="{field:'Title', sort: true,toolbar: '#titt'}">标题</th>
                    <th lay-data="{field:'Type', width:180, sort: true}">分类</th>
                    <th lay-data="{field:'Time', width:180, sort: true}">发布时间</th>
                </tr>
            </thead>
        </table>
    </div>
</div>
<script type="text/html" id="titt">
    <a href="javascript:;" onclick="btn_add('/Home/Arc','测试文章标题','100%','100%')">{{d.Title}}</a>
</script>
<script>
    var table;
    var $;
    layui.use(['table', 'form','laydate'], function () {
        $ = layui.jquery;
        var form = layui.form;
        table = layui.table;
        var laydate = layui.laydate;
        laydate.render({
            elem: '#test6'
            , range: true
        });
    });
    
    function btn_add(url, title, width, height) {
        layer.open({
            type:2,
            title: title,
            area: [width, height],
            content: url,
            btn: ['关闭'],
            yes: function (index) {
                layer.close(index);
            }
        });
    }
</script>

